package com.slkj.shilixiaoyuanapp.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created  on 2018-08-20
 *
 * @author 唐开阔
 * @describe
 */
public class ToolOutWorkDetailEntity implements Parcelable {

    /**
     * id : 29
     * inntime : 2018-08-20
     * site : 成都天府六街
     * startDate : 2018-08-20
     * endDate : 2018-08-20
     * duration : 5.0
     * body : 出差写代码
     * state : 1
     * auditor : [{"uId":2,"uName":"任浩","headImg":"http://192.168.1.73:8081/images/school3/moraCharacter/1534741401121.jpg"}]
     * refute : 其他安排
     * img : []
     */

    private int id;
    private String inntime;
    private String site;
    private String startDate;
    private String endDate;
    private double duration;
    private String body;
    private int state;
    private String refute;
    private ArrayList<PeopleEntity> auditor;
    private boolean urge;
    private int myState;

    protected ToolOutWorkDetailEntity(Parcel in) {
        id = in.readInt();
        inntime = in.readString();
        site = in.readString();
        startDate = in.readString();
        endDate = in.readString();
        duration = in.readDouble();
        body = in.readString();
        state = in.readInt();
        refute = in.readString();
        auditor = in.createTypedArrayList(PeopleEntity.CREATOR);
        urge = in.readByte() != 0;
        myState = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(inntime);
        dest.writeString(site);
        dest.writeString(startDate);
        dest.writeString(endDate);
        dest.writeDouble(duration);
        dest.writeString(body);
        dest.writeInt(state);
        dest.writeString(refute);
        dest.writeTypedList(auditor);
        dest.writeByte((byte) (urge ? 1 : 0));
        dest.writeInt(myState);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<ToolOutWorkDetailEntity> CREATOR = new Creator<ToolOutWorkDetailEntity>() {
        @Override
        public ToolOutWorkDetailEntity createFromParcel(Parcel in) {
            return new ToolOutWorkDetailEntity(in);
        }

        @Override
        public ToolOutWorkDetailEntity[] newArray(int size) {
            return new ToolOutWorkDetailEntity[size];
        }
    };

    public int getMyState() {
        return myState;
    }

    public void setMyState(int myState) {
        this.myState = myState;
    }

    public int getId() {
        return id;
    }

    public boolean isUrge() {
        return urge;
    }

    public void setUrge(boolean urge) {
        this.urge = urge;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getInntime() {
        return inntime;
    }

    public void setInntime(String inntime) {
        this.inntime = inntime;
    }

    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public double getDuration() {
        return duration;
    }

    public void setDuration(double duration) {
        this.duration = duration;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getRefute() {
        return refute;
    }

    public void setRefute(String refute) {
        this.refute = refute;
    }

    public ArrayList<PeopleEntity> getAuditor() {
        return auditor;
    }

    public void setAuditor(ArrayList<PeopleEntity> auditor) {
        this.auditor = auditor;
    }
}
